﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;


[assembly: ComVisible(true)]
[assembly: Guid("4b2f3b50-1111-4ccc-bbbb-8cccddddaaa1")] // 替换为你的GUID  
namespace ClassLibrary1
{
    internal class Class2
    {


    }

    [ComVisible(true)]
    [Guid("4b2f3b50-1111-4ccc-bbbb-8cccddddaaa2")] // 替换为你的另一个GUID  
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface IMyComInterface
    {
        [ComVisible(true)]
        int Add(int a, int b);
    }

    [ComVisible(true)]
    [Guid("4b2f3b50-1111-4ccc-bbbb-8cccddddaaa3")] // 替换为你的另一个GUID  
    [ClassInterface(ClassInterfaceType.None)]
    public class MyComClass : IMyComInterface
    {
        public int Add(int a, int b)
        {
            return a + b;
        }
    }
}
